package edu.mapi.ir.controllers.reactive;

import edu.mapi.ir.ciberIF.ciberIF;

/**
 * Basic, reactive, controller that activates the returning led 
 * whenever the ground sensor is activated
 * @author ZP
 */
public class AtTarget implements ReactiveController {

	public boolean decide(ciberIF cif) {
		if (cif.IsGroundReady() && cif.GetGroundSensor() > 0) {
			cif.SetReturningLed(true);
			return true;			
		}
		return false;
	}

	public String getDescription() {
		return "If at target, signal end";
	}
}
